package xin.marcher.module.search.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xin.marcher.module.search.domain.entity.ProductSearchDO;
import xin.marcher.module.search.domain.entity.SkuInfoDO;

import java.util.List;

/**
 * SKU信息
 */
@Mapper
public interface SkuInfoMapper extends BaseMapper<SkuInfoDO> {

    /**
     * 根据skuId查询和商品索引相关的信息
     *
     * @param skuId
     * @return
     */
    ProductSearchDO queryProductSearchInfo(@Param("skuId") String skuId);

    /**
     * 根据itemId查询和商品索引相关的信息
     *
     * @param itemId
     * @return
     */
    List<ProductSearchDO> queryProductSearchInfos(@Param("itemId") String itemId);
}